home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / restore.z / restore
Encoding:
Text File  |  1998-10-20  |  22.0 KB  |  463 lines

  1.  
  2.  
  3.  
  4. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      restore, rrestore - incremental filesystem restore
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      rrrreeeessssttttoooorrrreeee key [ name ... ]
  13.      rrrrrrrreeeessssttttoooorrrreeee key [ name ... ]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _r_e_s_t_o_r_e, and _r_r_e_s_t_o_r_e are applicable only to dumps made by _d_u_m_p(1m) from
  17.      EFS filesystems, but they can restore files into any type of filesystem,
  18.      not just an EFS filesystem.
  19.  
  20.      _r_e_s_t_o_r_e reads tapes dumped with the _d_u_m_p(1M) command and restores them
  21.      _r_e_l_a_t_i_v_e _t_o _t_h_e _c_u_r_r_e_n_t _d_i_r_e_c_t_o_r_y.  Its actions are controlled by the _k_e_y
  22.      argument.  The _k_e_y is a string of characters containing at most one
  23.      function letter and possibly one or more function modifiers.  Any
  24.      arguments supplied for specific options are given as subsequent words on
  25.      the command line, in the same order as that of the options listed.  Other
  26.      arguments to the command are file or directory names specifying the files
  27.      that are to be restored.  Unless the hhhh key is specified (see below), the
  28.      appearance of a directory name refers to the files and (recursively)
  29.      subdirectories of that directory.
  30.  
  31.      The function portion of the key is specified by one of the following
  32.      letters:
  33.  
  34.      rrrr    Restore the entire tape.  The tape is read and its full contents
  35.           loaded into the current directory.  This should not be done lightly;
  36.           the rrrr key should only be used to restore a complete level 0 dump
  37.           tape onto a clear filesystem or to restore an incremental dump tape
  38.           after a full level 0 restore.  Thus
  39.  
  40.                _////_eeee_tttt_cccc_////_mmmm_kkkk_ffff_ssss _////_dddd_eeee_vvvv_////_dddd_ssss_kkkk_////_dddd_kkkk_ssss_0000_dddd_2222_ssss_0000
  41.                _////_eeee_tttt_cccc_////_mmmm_oooo_uuuu_nnnn_tttt _////_dddd_eeee_vvvv_////_dddd_ssss_kkkk_0000_dddd_2222_ssss_0000 _////_mmmm_nnnn_tttt
  42.                _cccc_dddd _////_mmmm_nnnn_tttt
  43.                _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _rrrr
  44.  
  45.           is a typical sequence to restore a complete dump.  Another _r_e_s_t_o_r_e
  46.           can be done to get an incremental dump in on top of this.  Note that
  47.           _r_e_s_t_o_r_e leaves a file _r_e_s_t_o_r_e_s_y_m_t_a_b_l_e in the root directory to pass
  48.           information between incremental restore passes.  This file should be
  49.           removed when the last incremental tape has been restored.  Also, see
  50.           the note in the BUGS section below.
  51.  
  52.      RRRR    Resume restoring.  _r_e_s_t_o_r_e requests a particular tape of a multi
  53.           volume set on which to restart a full restore (see the rrrr key above).
  54.           This allows _r_e_s_t_o_r_e to be interrupted and then restarted.
  55.  
  56.      xxxx    The named files are extracted from the tape.  If the named file
  57.           matches a directory whose contents had been written onto the tape,
  58.           and the hhhh key is nnnnooootttt specified, the directory is recursively
  59.           extracted.  The owner, modification time, and mode are restored (if
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  71.  
  72.  
  73.  
  74.           possible).  If no file argument is given, the root directory is
  75.           extracted, which results in the entire content of the tape being
  76.           extracted unless the hhhh key has been specified.
  77.  
  78.      tttt    The names of the specified files are listed if they occur on the
  79.           tape.  If no file argument is given, the root directory is listed,
  80.           which results in the entire content of the tape being listed unless
  81.           the hhhh key has been specified.  Note that the tttt key replaces the
  82.           function of the old _d_u_m_p_d_i_r program.
  83.  
  84.      iiii    This mode allows interactive restoration of files from a dump tape.
  85.           After reading in the directory information from the tape, _r_e_s_t_o_r_e
  86.           provides a shell like interface that allows the user to move around
  87.           the directory tree selecting files to be extracted.  The available
  88.           commands are given below; for those commands that require an
  89.           argument, the default is the current directory.
  90.  
  91.           llllssss [_a_r_g]   List the current or specified directory.  Entries that
  92.                      are directories are appended with a ////.  Entries that have
  93.                      been marked for extraction are prepended with a ****.  If
  94.                      the verbose key is set the inode number of each entry is
  95.                      also listed.
  96.  
  97.           ccccdddd _a_r_g     Change the current working directory to the specified
  98.                      argument.
  99.  
  100.           ppppwwwwdddd        Print the full pathname of the current working directory.
  101.  
  102.           aaaadddddddd [_a_r_g]  The current directory or specified argument is added to
  103.                      the list of files to be extracted.  If a directory is
  104.                      specified, it and all its descendents are added to the
  105.                      extraction list (unless the hhhh key is specified on the
  106.                      command line).  Files that are on the extraction list are
  107.                      prepended with a **** when they are listed by llllssss.
  108.  
  109.           ddddeeeelllleeeetttteeee [_a_r_g]
  110.                      The current directory or specified argument is deleted
  111.                      from the list of files to be extracted.  If a directory
  112.                      is specified, it and all its descendents are deleted from
  113.                      the extraction list (unless the hhhh key is specified on the
  114.                      command line).  The most expedient way to extract most of
  115.                      the files from a directory is to add the directory to the
  116.                      extraction list and then delete those files that are not
  117.                      needed.
  118.  
  119.           eeeexxxxttttrrrraaaacccctttt    All the files that are on the extraction list are
  120.                      extracted from the dump tape.  _r_e_s_t_o_r_e asks which volume
  121.                      the user wishes to mount.  The fastest way to extract a
  122.                      few files is to start with the last volume and work
  123.                      towards the first volume.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  137.  
  138.  
  139.  
  140.           sssseeeettttmmmmooooddddeeeessss   All the directories that have been added to the
  141.                      extraction list have their owner, modes, and times set;
  142.                      nothing is extracted from the tape.  This is useful for
  143.                      cleaning up after a _r_e_s_t_o_r_e has been prematurely aborted.
  144.  
  145.           vvvveeeerrrrbbbboooosssseeee    The sense of the vvvv key is toggled.  When set, the verbose
  146.                      key causes the llllssss command to list the inode numbers of
  147.                      all entries.  It also causes _r_e_s_t_o_r_e to print out
  148.                      information about each file as it is extracted.
  149.  
  150.           hhhheeeellllpppp       List a summary of the available commands.
  151.  
  152.           qqqquuuuiiiitttt       _r_e_s_t_o_r_e immediately exits, even if the extraction list is
  153.                      not empty.
  154.  
  155.      The following characters can be used in addition to the letter that
  156.      selects the function desired.
  157.  
  158.      bbbb    The next _a_r_g_u_m_e_n_t to _r_e_s_t_o_r_e is used as the block size of the tape
  159.           (in kilobytes).  If the bbbb option is not specified, _r_e_s_t_o_r_e tries to
  160.           determine the tape block size dynamically, but is only able to do so
  161.           if the block size is 32 or less.  For larger sizes, the bbbb option
  162.           must be used with _r_e_s_t_o_r_e.
  163.  
  164.      ffff    The next _a_r_g_u_m_e_n_t to _r_e_s_t_o_r_e is used as the name of the archive
  165.           instead of /_d_e_v/_t_a_p_e.  If the name of the file is ----, _r_e_s_t_o_r_e reads
  166.           from standard input.  Thus, _d_u_m_p(1M) and _r_e_s_t_o_r_e can be used in a
  167.           pipeline to dump and restore a filesystem with the command
  168.  
  169.                _dddd_uuuu_mmmm_pppp _0000_ffff _---- _////_uuuu_ssss_rrrr _|||| _((((_cccc_dddd _////_mmmm_nnnn_tttt_;;;; _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _xxxx_ffff _----_))))
  170.  
  171.           If the name of the file is of the format _m_a_c_h_i_n_e:_d_e_v_i_c_e, the
  172.           filesystem dump is restored from the specified machine over the
  173.           network.  _r_e_s_t_o_r_e creates a remote server /_e_t_c/_r_m_t, on the client
  174.           machine to access the tape device.  Since _r_e_s_t_o_r_e is normally run by
  175.           root, the name of the local machine must appear in the ._r_h_o_s_t_s file
  176.           of the remote machine.  If the filename _a_r_g_u_m_e_n_t is of the form
  177.           _u_s_e_r@_m_a_c_h_i_n_e:_d_e_v_i_c_e, _r_e_s_t_o_r_e attempts to execute as the specified
  178.           use on the remote machine.  The specified user must have a ._r_h_o_s_t_s
  179.           file on the remote machine that allows root from the local machine.
  180.  
  181.      vvvv    Normally _r_e_s_t_o_r_e does its work silently.  The vvvv (verbose) key causes
  182.           it to type the name of each file it treats preceded by its file
  183.           type.
  184.  
  185.      yyyy    _r_e_s_t_o_r_e does not ask whether it should abort the restore if gets a
  186.           tape error.  It always tries to skip over the bad tape block(s) and
  187.           continue as best it can.
  188.  
  189.      mmmm    _r_e_s_t_o_r_e extracts by inode numbers rather than by filename.  This is
  190.           useful if only a few files are being extracted, and one wants to
  191.           avoid regenerating the complete pathname to the file.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      hhhh    _r_e_s_t_o_r_e extracts the actual directory, rather than the files that it
  207.           references.  This prevents hierarchical restoration of complete
  208.           subtrees from the tape.
  209.  
  210.      ssss    The next _a_r_g_u_m_e_n_t to _r_e_s_t_o_r_e is a number that selects the dump file
  211.           when there are multiple dump files on the same tape.  File numbering
  212.           starts at 1.
  213.  
  214.      nnnn    Only those files that are newer than the file specified by the next
  215.           _a_r_g_u_m_e_n_t are considered for restoration.  _r_e_s_t_o_r_e looks at the
  216.           modification time of the specified file using the ssssttttaaaatttt(2) system
  217.           call.
  218.  
  219.      eeee    No existing files are overwritten.
  220.  
  221.      EEEE    Restores only non-existent files or newer versions (as determined by
  222.           the file status change time stored in the dump file) of existing
  223.           files.  Note that the _l_s(1) command shows the modification time and
  224.           not the file status change time.  See _s_t_a_t(2) for more details.
  225.  
  226.      dddd    Turn on debugging output.
  227.  
  228.      oooo    Normally _r_e_s_t_o_r_e does not use _c_h_o_w_n(2) to restore files to the
  229.           original user and group id unless it is being run by the superuser
  230.           (or with the effective user id of zero).  This is to provide
  231.           Berkeley-style semantics.  This can be overridden with the oooo option
  232.           which results in _r_e_s_t_o_r_e attempting to restore the original
  233.           ownership to the files.
  234.  
  235.      NNNN    Do not write anything to the disk.  This option can be used to
  236.           validate the tapes after a dump.  If invoked with the rrrr option,
  237.           _r_e_s_t_o_r_e goes through the motion of reading all the dump tapes
  238.           without actually writing anything to the disk.
  239.  
  240. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  241.      _r_e_s_t_o_r_e complains about bad key characters.
  242.  
  243.      On getting a read error, _r_e_s_t_o_r_e prints out diagnostics.  If yyyy has been
  244.      specified, or the user responds yyyy, _r_e_s_t_o_r_e attempts to continue the
  245.      restore.
  246.  
  247.      If the dump extends over more than one tape, _r_e_s_t_o_r_e asks the user to
  248.      change tapes.  If the xxxx or iiii key has been specified, _r_e_s_t_o_r_e also asks
  249.      which volume the user wishes to mount.  The fastest way to extract a few
  250.      files is to start with the last volume and work towards the first volume.
  251.  
  252.      There are numerous consistency checks that can be listed by _r_e_s_t_o_r_e.
  253.      Most checks are self-explanatory or can never happen.  Common errors are
  254.      given below.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      Converting to new filesystem format.
  273.           A dump tape created from the old filesystem has been loaded.  It is
  274.           automatically converted to the new filesystem format.
  275.  
  276.      <_f_i_l_e_n_a_m_e>: not found on tape
  277.           The specified filename was listed in the tape directory, but was not
  278.           found on the tape.  This is caused by tape read errors while looking
  279.           for the file, and from using a dump tape created on an active
  280.           filesystem.
  281.  
  282.      expected next file <_i_n_u_m_b_e_r>, got <_i_n_u_m_b_e_r>
  283.           A file that was not listed in the directory showed up.  This can
  284.           occur when using a dump tape created on an active filesystem.
  285.  
  286.      Incremental tape too low
  287.           When doing incremental restore, a tape that was written before the
  288.           previous incremental tape, or that has too low an incremental level
  289.           has been loaded.
  290.  
  291.      Incremental tape too high
  292.           When doing incremental restore, a tape that does not begin its
  293.           coverage where the previous incremental tape left off, or that has
  294.           too high an incremental level has been loaded.
  295.  
  296.      Tape read error while restoring <_f_i_l_e_n_a_m_e>
  297.      Tape read error while skipping over inode <_i_n_u_m_b_e_r>
  298.      Tape read error while trying to resynchronize
  299.           A tape read error has occurred.  If a filename is specified, its
  300.           contents are probably partially wrong.  If an inode is being skipped
  301.           or the tape is trying to resynchronize, no extracted files have been
  302.           corrupted, though files may not be found on the tape.
  303.  
  304.      resync restore, skipped <_n_u_m> blocks
  305.           After a tape read error, _r_e_s_t_o_r_e may have to resynchronize itself.
  306.           This message lists the number of blocks that were skipped over.
  307.  
  308.      Error while writing to file /tmp/rstdir*
  309.           An error was encountered while writing to the temporary file
  310.           containing information about the directories on tape.  Use the
  311.           TMPDIR environment variable to relocate this file in a directory
  312.           that has more space available.
  313.  
  314.      Error while writing to file /tmp/rstdir*
  315.           An error was encountered while writing to the temporary file
  316.           containing information about the owner, mode and timestamp
  317.           information of directories.  Use the TMPDIR environment variable to
  318.           relocate this file in a directory that has more space available.
  319.  
  320. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  321.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _rrrr
  322.  
  323.      Restores the entire tape into the current directory, reading from the
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      default tape device /_d_e_v/_t_a_p_e.
  339.  
  340.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _rrrr_ffff _gggg_uuuu_eeee_ssss_tttt_@@@@_kkkk_eeee_ssss_tttt_rrrr_eeee_llll_...._ssss_gggg_iiii_...._cccc_oooo_mmmm_::::_////_dddd_eeee_vvvv_////_tttt_aaaa_pppp_eeee
  341.  
  342.      Restores the entire tape into the current directory, reading from the
  343.      remote tape device /_d_e_v/_t_a_p_e on host kestrel.sgi.com using the guest
  344.      account.
  345.  
  346.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _xxxx _////_eeee_tttt_cccc_////_hhhh_oooo_ssss_tttt_ssss _////_eeee_tttt_cccc_////_ffff_ssss_tttt_aaaa_bbbb _////_eeee_tttt_cccc_////_mmmm_yyyy_ffff_iiii_llll_eeee
  347.  
  348.      Restores the three specified files into the current directory, reading
  349.      from the default tape device /_d_e_v/_t_a_p_e.
  350.  
  351.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _xxxx _////_dddd_eeee_vvvv_////_dddd_ssss_kkkk
  352.  
  353.      Restores the entire /_d_e_v/_d_s_k directory and subdirectories recursively
  354.      into the current directory, reading from the default tape device
  355.      /_d_e_v/_t_a_p_e.
  356.  
  357.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _rrrr_NNNN
  358.  
  359.      Reads the entire tape and go through all the motions of restoring the
  360.      entire dump, without writing to the disk.  This can be used to validate
  361.      the dump tape.
  362.  
  363.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _xxxx_eeee _////_uuuu_ssss_rrrr_////_dddd_iiii_rrrr_////_ffff_oooo_oooo
  364.  
  365.      Restores (recursively) all files in the given directory /_u_s_r/_d_i_r/_f_o_o.
  366.      However, no existing files are overwritten.
  367.  
  368.           _rrrr_eeee_ssss_tttt_oooo_rrrr_eeee _xxxx_nnnn _////_uuuu_ssss_rrrr_////_dddd_iiii_rrrr_////_bbbb_aaaa_rrrr
  369.  
  370.      Restores (recursively) all files that are newer than the given file
  371.      /_u_s_r/_d_i_r/_b_a_r.
  372.  
  373. FFFFIIIILLLLEEEESSSS
  374.      /dev/tape       This is the default tape device used unless the
  375.                      environment variable TAPE is set.
  376.      /tmp/rstdir*    This temporary file contains the directories on the tape.
  377.                      If the environment variable TMPDIR is set, the file is
  378.                      created in that directory.
  379.      /tmp/rstmode*   This temporary file contains the owner, mode, and time
  380.                      stamps for directories.  If the environment variable
  381.                      TMPDIR is set, the file is created in that directory.
  382.      ./restoresymtable
  383.                      Information is passed between incremental restores in
  384.                      this file.
  385.  
  386. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  387.      dump(1M), mkfs(1M), mount(1M), rmt(1M), rhosts(4), mtio(7).
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. rrrreeeessssttttoooorrrreeee((((1111MMMM))))                                                        rrrreeeessssttttoooorrrreeee((((1111MMMM))))
  401.  
  402.  
  403.  
  404. NNNNOOOOTTTTEEEESSSS
  405.      _r_r_e_s_t_o_r_e is a link to _r_e_s_t_o_r_e.
  406.  
  407. BBBBUUUUGGGGSSSS
  408.      _r_e_s_t_o_r_e can get confused when doing incremental restores from dump tapes
  409.      that were made on active filesystems.
  410.  
  411.      A level 0 dump must be done after a full restore.  Because _r_e_s_t_o_r_e runs
  412.      in user code, it has no control over inode allocation.  This results in
  413.      the files being restored having an inode numbering different from the
  414.      filesystem that was originally dumped.  Thus a full dump must be done to
  415.      get a new set of directories reflecting the new inode numbering, even
  416.      though the contents of the files is unchanged, so that later incremental
  417.      dumps will be correct.
  418.  
  419.      Existing dangling symlinks are modified even if the eeee option is supplied,
  420.      if the dump tape contains a hard link by the same name.
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.